***This do-file creates Figure 5 of the paper
**Curtis RESTAT
**Change to directory where data and code were downloaded
**cd 

set matsize 10000
set more off
use qwi_all_figure5.dta,clear
qui do qwi_dataprep_figure5.do
unique state
gen lemps=ln(emps+1)
gen lemp=ln(empend+1)
gen lhiras=ln(hiras)
gen lseps=ln(seps)
gen hire_rate=hiras/emps
gen sep_rate=seps/emps
gen learns=ln(earns)
gen lpayroll=ln(payroll)
qui tab quarter,gen(seasondum)

qui areg lemps intxeastxqtrdum1-intxeastxqtrdum20 intxeastxqtrdum22-intxeastxqtrdum44 postxeast postxint intxeast trendinddum* qtrdum* [aweight=emp_weight2],abs(state_ind) rob cluster(geoind)

parmest,format(estimate min95 max95) saving(qtrcoeffs.dta,replace)
use qtrcoeffs,clear
keep in 1/43



local new = _N + 1
set obs `new'
replace parm="intxeastxqtrdum21" if parm==""
replace estimate=0 if estimate==.
replace min95=0 if min95==.
replace max95=0 if max95==.

gen quarter=substr(parm,16,.)
destring quarter,replace
so quarter
twoway line estimate min95 max95 quarter, clcolor(blue green green) lpattern(solid dash dash) 



